<%--
  Created by IntelliJ IDEA.
  User: 29276
  Date: 2021/8/21
  Time: 14:48
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    //http://localhost:8080/01_sxtoa_war_exploded/
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <base href="<%=basePath%>"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $(".click").click(function() {
                $(".tip").fadeIn(200);
            });
            $(".tiptop a").click(function() {
                $(".tip").fadeOut(200);
            });
            $(".sure").click(function() {
                $(".tip").fadeOut(100);
            });
            $(".cancel").click(function() {
                $(".tip").fadeOut(100);
            });
        });
    </script>

    <script type="text/javascript">
        $(function () {
            $.post("expenseServlet", {methodName: "toAudit"}, function (data) {
                if (data === "sessionTimeOut") {
                    window.location.href="login.jsp";
                    return;
                }
                eval("var es=" + data);
                var tb = $("#tb");
                console.log(es);
                for (var i = 0; i < es.length; i++) {
                    tb.append("<tr>\n" +
                        "            <td>\n" +
                        "                <input name=\"\" type=\"checkbox\" value=\"\" />\n" +
                        "            </td>\n" +
                        "            <td>"+es[i].realName+"</td>\n" +
                        "            <td>"+es[i].totalAmount+"</td>\n" +
                        "            <td>"+es[i].expTime+"</td>\n" +
                        "            <td>"+es[i].expDesc+"</td>\n" +
                        "            <td><a href=\"expense/expenseDetail.jsp?expId="+es[i].expId+"\" class=\"tablelink\"> 查看具体报销项</a></td>\n" +
                        "            <td><a href=\"javascript:open('expense/audit.jsp?expId="+es[i].expId+"&totalAmount="+es[i].totalAmount+"','','width=500,height=230,left=300,top=300,location=0,scrollbars=0,resizable=0')\" class=\"tablelink\">审核</a>  <a href=\"expense/expenseRecord.jsp?expId="+es[i].expId+"\" class=\"tablelink\">查看审核记录</a></td>\n" +
                        "        </tr>");
                }
            })
        })

        function reloadPage() {
            window.location.reload();
        }
    </script>

</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">报销管理</a></li>
        <li><a href="#">待审报销</a></li>
    </ul>
</div>

<div class="rightinfo">

    <div class="formtitle1"><span>待审报销</span></div>

    <table class="tablelist">
        <thead>
        <tr>
            <th>
                <input name="" type="checkbox" value="" checked="checked" />
            </th>
            <th>报销人<i class="sort"><img src="images/px.gif" /></i></th>
            <th>报销总额</th>
            <th>报销时间</th>
            <th>总备注信息</th>
            <th>查看具体报销项</th>
            <th>审核</th>
        </tr>
        </thead>
        <tbody id="tb">
        </tbody>
    </table>

</div>

<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>

</body>

</html>
